from rule_engine import RuleEngine

# 创建 RuleEngine 实例，并加载配置文件
engine = RuleEngine('config.yaml')

# 定义符合意大利菜肴的输入数据
data = {
    "has_ingredients": True,
    "cuisine": "Italian",
    "dish": "Pizza"
}

# 评估规则
result = engine.evaluate(data)
print(f'Result: {result}')  # Output: Result: True

# 定义符合日本菜肴的输入数据
data2 = {
    "has_ingredients": True,
    "cuisine": "Japanese",
    "dish": "Sushi"
}

# 评估规则
result2 = engine.evaluate(data2)
print(f'Result: {result2}')  # Output: Result: True

# 定义不符合规则的输入数据
data3 = {
    "has_ingredients": True,
    "cuisine": "Italian",
    "dish": "Ramen"
}

# 评估规则
result3 = engine.evaluate(data3)
print(f'Result: {result3}')  # Output: False

# 定义缺少原料的输入数据
data4 = {
    "has_ingredients": False,
    "cuisine": "Italian",
    "dish": "Pizza"
}

# 评估规则
result4 = engine.evaluate(data4)
print(f'Result: {result4}')  # Output: False

# 定义没有匹配到任何 case 的输入数据
data5 = {
    "has_ingredients": True,
    "cuisine": "Mexican",
    "dish": "Taco"
}

# 评估规则
result5 = engine.evaluate(data5)
print(f'Result: {result5}')  # Output: False (assuming default case evaluates to False)